package com.syni.mdd.yhd.common.all.service.groupBuy;

import com.syni.mdd.yhd.common.all.dao.jpa.groupBuy.BmsUserBargainDao;
import com.syni.mdd.yhd.common.all.entity.groupBuy.BmsUserBargain;
import com.syni.mdd.sjb.common.component.utils.common.utils.ParamsMap;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @className BmsDxGroupBuyUseService
 * @description TOO
 * @Author cfx
 * @DATE 2019/7/30 10:58
 * @VERSION 1.0
 **/
public interface BmsUserBargainService {
    String CREATE_RP_EXIST_CODE = "-3";

    //用户创建砍价订单
    String createCuttingOrderUrl = "/market/mddBargain/createCuttingOrder";
    //用户开始砍价
    String startCuttingOrderUrl = "/market/mddBargain/cut";
    //分享得砍价机会
    String shareCuttingOrderUrl = "/market/mddBargain/getSelfCutChance";
    //下单
    String commitCuttingOrderUrl = "/market/mddBargain/orderComplete";
    //支付
    String payCuttingOrderUrl = "/market/mddBargain/payCompleted";


    //未支付
    Integer NO_PAY_SATUS = 0;
    //已支付
    Integer PAY_STATUS = 1;
    //已使用
    Integer ALREADY_USE = 2;
    //已过期
    Integer ALREADY_EXPIRE = 3;

    int CAN_BARGAIN_STATUS = 1;

    int CAN_BUY_STATUS = 2;

    int EXPIRE_STATUS = 3;

    BmsUserBargainDao getBaseDao();

    Map<String, Object> bargain(ParamsMap paramsMap);

    Map<String, Object> getMyBargain(ParamsMap paramsMap);

    Map<String, Object> helpBargainPage(ParamsMap paramsMap);

    Map<String, Object> userHelpBargain(ParamsMap paramsMap);

    Map<String, Object> getBargainHelpRecord(ParamsMap paramsMap);

    Map<String, Object> getAllActivity(ParamsMap paramsMap);

    BmsUserBargain getBargainById(Integer bargainId);

    void verBmsDxGroupBuy(Integer orderId);

    Map<String, Object> share(ParamsMap paramsMap);

    Map<String, Object> getMyBargainGroupBuy(ParamsMap paramsMap);

    Integer getBargainHelpNum(Integer bargainId);

    void orderPay(String saasOrderId);

    void handleBackCardLogic(BmsUserBargain bmsUserBargain);

    void orderCommit(String saasOrderId);

    List<BmsUserBargain> getBargainByIdIn(Set<Integer> bargainId);

    Map<Integer,BmsUserBargain> getBargainByIdInMap(Set<Integer> bargainId);
}
